package com.mybatis.pojo;

import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Table(name = "mmall_user") //指定表名
public class User {
    @Id     //指定这个表的主键
    @KeySql(useGeneratedKeys = true)  //表示主键自增 主键回写
    private Integer id;

    private String username;

    private String password;

    private String email;

    private String phone;

    private String question;

    private String answer;

    private Integer role;

    @Transient      //表示这个字段不需要替换到数据库
    private Date createTime;

    private Date updateTime;

    }